1500
How can I add a Zero-Lenght bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumns
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumns:Add("Start"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumns:Add("End"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
			oColumns:Add("Duration"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2010"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:AllowLinkBars := .F.
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			h1 := oItems:AddItem("M1")
			oItems:AddBar(h1,"Milestone","09/29/2010","09/29/2010")
			oItems:SetProperty("ItemBar",h1,"",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1499
Can I use bars like Milestone (Zero-Length bar) in SchedulePDM

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	DevOut( Transform(oG2antt:Items:SchedulePDM(Item,Key),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumns
	LOCAL oConditionalFormat,oConditionalFormat1
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumns:Add("Start"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumns:Add("End"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,543)
			oColumns:Add("Duration"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%3")
			oConditionalFormat:Bold := .T.
			oConditionalFormat:ApplyTo := -1/*exFormatToItems*/
		oConditionalFormat1 := oG2antt:ConditionalFormats():Add("%3 = 0")
			oConditionalFormat1:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 196,196,196 } )  , .F. ))
			oConditionalFormat1:ApplyTo := 3/*0x3+*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2010"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			h1 := oItems:AddItem("M1")
			oItems:AddBar(h1,"Milestone","09/27/2010","09/27/2010")
			oItems:SetProperty("ItemBar",h1,"",20/*exBarKeepWorkingCount*/,.T.)
			h2 := oItems:AddItem("T1")
			oItems:AddBar(h2,"Task","09/27/2010","09/27/2010")
			oItems:SetProperty("ItemBar",h2,"",543/*exBarEndInclusive*/,"09/27/2010")
			oItems:SetProperty("ItemBar",h2,"",20/*exBarKeepWorkingCount*/,.T.)
			oItems:AddLink("L1",h1,"",h2,"")
			h3 := oItems:AddItem("T2")
			oItems:AddBar(h3,"Task","09/27/2010","09/27/2010")
			oItems:SetProperty("ItemBar",h3,"",543/*exBarEndInclusive*/,"09/27/2010")
			oItems:SetProperty("ItemBar",h3,"",20/*exBarKeepWorkingCount*/,.T.)
			oItems:AddLink("L2",h1,"",h3,"")
			oItems:SetProperty("Link","L2",16/*exLinkPDMWorkingDelay*/,5)
			h4 := oItems:AddItem("M3")
			oItems:AddBar(h4,"Milestone","09/27/2010","09/27/2010")
			oItems:SetProperty("ItemBar",h4,"",20/*exBarKeepWorkingCount*/,.F.)
			oItems:AddLink("L3",h1,"",h4,"")
			oItems:SetProperty("Link","L3",16/*exLinkPDMWorkingDelay*/,5)
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1498
How can I prevent vertical scrolling when user clicks the overview part of the control

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1497
I need to specify the start and end dates of the bar to be the same, but no bars are shown. (recommended for bars with exBarKeepWorkingCount ) What I can do

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumns:Add("Start"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumns:Add("End"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,543)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:ShowEmptyBars := 0
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","09/21/2006","09/21/2006")
			oItems:SetProperty("ItemBar",h,"",543/*exBarEndInclusive*/,oItems:ItemBar(h,"",1/*exBarStart*/))
			oItems:SetProperty("ItemBar",h,"",20/*exBarKeepWorkingCount*/,.T.)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","09/21/2006","09/21/2006")
			oItems:SetProperty("ItemBar",h,"",543/*exBarEndInclusive*/,"09/25/2006")
			oItems:SetProperty("ItemBar",h,"",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1496
How can I display the end date to be the last visible date of task, instead the next day

PROCEDURE OnBarResize(oG2antt,Item,Key)
	oG2antt:Items():SchedulePDM(Item,Key)
RETURN

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	oG2antt:Items():SchedulePDM(Item,Key)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oConditionalFormat
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResize := {|Item,Key| OnBarResize(oG2antt,Item,Key)} /*Occurs when a bar is moved or resized.*/
		oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:HeaderHeight := 36
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumns:Add("Start"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumn := oColumns:Add("End")
				oColumn:HTMLCaption := "<b>End</b><br>Inclusive"
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,543)
				oColumn:Editor():EditType := 7/*DateType*/
			oColumns:Add("End"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oConditionalFormat := oG2antt:ConditionalFormats():Add(Transform(1,""))
			oConditionalFormat:Bold := .T.
			oConditionalFormat:ApplyTo := 2/*0x2+*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/21/2006","09/23/2006")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","09/21/2006","09/26/2006")
			oItems:AddLink("link",h1,"",h2,"")
			oItems:SetProperty("ItemBar",0,"<*>",20/*exBarKeepWorkingCount*/,.T.)
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1495
How do I hide the selection
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor())
		oG2antt:SetProperty("SelBackColor",oG2antt:BackColor())
		oG2antt:ShowFocusRect := .F.
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("Format")
				oColumn:FormatColumn := "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
				oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			oItems:AddItem(10)
			oItems:AddItem(-8)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1494
How do I access the cells, or how do I get the values in the columns
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oColumns := oG2antt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("CellValue",h,1,"SubItem 1.1")
			oItems:SetProperty("CellValue",h,2,"SubItem 1.2")
			DevOut( Transform(oItems:CellValue(h,1),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1493
Is there any function I can use to indicate the Now() when using the ComputedFields, CondtionalFormats, ...
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Now"):ComputedField := "date(``)"
		oG2antt:Items():AddItem("")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1492
How can I get the start and end points of the bar once the BarResize event occurs
PROCEDURE OnBarResize(oG2antt,Item,Key)
	DevOut( "Start: " )
	DevOut( Transform(oG2antt:Items:ItemBar(Item,Key,1/*exBarStart*/),"") )
	DevOut( "End: " )
	DevOut( Transform(oG2antt:Items:ItemBar(Item,Key,2/*exBarEnd*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL var_Bar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResize := {|Item,Key| OnBarResize(oG2antt,Item,Key)} /*Occurs when a bar is moved or resized.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/31/2009"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			var_Bar := oChart:Bars:Item("Task")
		oG2antt:Columns():Add("Types")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2010","01/09/2010","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1491
My chart displays hours, the question would be if possible to let user resizes the bars up to 1/2 hour, or a half an hour
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:LevelCount := 2
			oChart:UnitScale := 65536/*exHour*/
			oChart:ResizeUnitScale := 1048576/*exMinute*/
			oChart:ResizeUnitCount := 30
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:Level(1):DrawGridLines := .T.
		oItems := oG2antt:Items()
			oItems:AddItem("Task")
			oItems:AddItem("Task")
			oItems:AddItem("Task")
			oItems:AddItem("Task")
			oItems:AddItem("Task")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1490
How can I show the dates in the title
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/30/2002"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:UnitScale := 65536/*exHour*/
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:Level(0):Alignment := 17/*exHOutside+CenterAlignment*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1489
If I vertically scroll the control the image flows fluently. But when I scroll on the horizontal chart's scrollbar the images only shows after I release the click button. Can I make it scroll fluently like the vertical scrollbar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():SetProperty("PaneWidth",.F.,0)
		oG2antt:Chart():ToolTip := ""

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1488
How can I programmatically add a bar during the CreateBar event
PROCEDURE OnCreateBar(oG2antt,Item,DateStart,DateEnd)
	LOCAL oItems
	LOCAL k
	oItems := oG2antt:Items()
		k := oItems:ItemBar(Item,"",256/*exBarsCount*/)
		oItems:AddBar(Item,"Order",DateStart,DateEnd,k,"your text")
	DevOut( Transform(oG2antt:Items:ItemBar(Item,"",256/*exBarsCount*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:CreateBar := {|Item,DateStart,DateEnd| OnCreateBar(oG2antt,Item,DateStart,DateEnd)} /*Fired when the user creates a new bar.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := -1/*exCreateBarManual*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oChart:Bars():CallMethod("Copy","Task","Order")
		oItems := oG2antt:Items()
			oItems:AddItem(1)
			oItems:AddItem(2)
			oItems:AddItem(3)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1487
How can I move more bars by code
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/01/2001","01/06/2001","A")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/07/2001","B")
			oItems:SetProperty("ItemBar",0,"<*>",514/*exBarMove*/,1)
			oItems:SetProperty("ItemBar",0,"<A*>",514/*exBarMove*/,1)
			oItems:SetProperty("ItemBar",0,"<B*>",514/*exBarMove*/,1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1486
How can I move a bar by code
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/01/2001","01/06/2001","A")
			oItems:SetProperty("ItemBar",h,"A",514/*exBarMove*/,1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1485
How can I clip the notes to the items zone only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oNote
	LOCAL oNotes
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			oItems:AddItem()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/05/2001","01/08/2001","1")
		oNotes := oG2antt:Chart():Notes()
			oNote := oNotes:Add("1",oG2antt:Items():ItemByIndex(1),"1","<img>2</img>")
				oNote:SetProperty("PartShadow",1/*exNoteEnd*/,.F.)
				oNote:SetProperty("PartBorderSize",1/*exNoteEnd*/,0)
				oNote:ClearPartBackColor(1/*exNoteEnd*/)
				oNote:SetProperty("PartCanMove",1/*exNoteEnd*/,.T.)
				oNote:RelativePosition := 0.5
				oNote:SetProperty("PartVOffset",1/*exNoteEnd*/,-36)
			oNotes:ClipTo := 2/*exNotesClipToItems*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1484
How can I put two bars of various types, in the event of conflict do not coincide

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:OverlaidGroup := "NewTask"
			oBar1 := oChart:Bars():CallMethod("Copy","Task","NewTask")
				oBar1:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar1:OverlaidGroup := "Task"
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			h := oItems:AddItem("Overlaid")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1","A1")
			oItems:AddBar(h,"NewTask","01/03/2001","01/05/2001","A2","A2")
			oItems:AddBar(h,"NewTask","01/04/2001","01/07/2001","A3","A3")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A4","A4")
			h1 := oItems:AddItem("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1483
How can I run trigger an event which, after clicking on the item/bar gives the key/name or item id
PROCEDURE OnMouseDown(oG2antt,Button,Shift,X,Y)
	LOCAL item,key
	item := oG2antt:ItemFromPoint(-1,-1,column,hit)
	key := oG2antt:Chart:BarFromPoint(-1,-1)
	DevOut( "Item:" )
	DevOut( Transform(item,"") )
	DevOut( "Key:" )
	DevOut( Transform(key,"") )
	DevOut( "CellValue(i,0):" )
	DevOut( Transform(oG2antt:Items:CellValue(item,0),"") )
	oG2antt:Items():SetProperty("ItemBar",item,key,33/*exBarColor*/,255)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseDown := {|Button,Shift,X,Y| OnMouseDown(oG2antt,Button,Shift,X,Y)} /*Occurs when the user presses a mouse button.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/04/2001","01/06/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1482
How can I change the check-boxes appearance

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"XP:Button 3 12")
			oAppearance:Add(2,"XP:Button 3 11")
			oAppearance:Add(3,"XP:Button 3 10")
		oG2antt:SetProperty("CheckImage",0/*Unchecked*/,16777216)
		oG2antt:SetProperty("CheckImage",1/*Checked*/,33554432)
		oG2antt:SetProperty("CheckImage",2/*PartialChecked*/,50331648)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1481
How can I change the color for the control's split bar (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Default")
		oG2antt:SetProperty("Background",18/*exSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 64
			oChart:OverviewHeight := 48
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1480
Is it possible to display ONLY the working hours

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oLevel := oChart:Level(0)
				oLevel:Label := 4096
				oLevel:Alignment := 17/*exHOutside+CenterAlignment*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<%hh%>"
				oLevel1:Count := 6
			oChart:UnitWidth := 26
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:NonworkingHours := 15728895
			oChart:ShowNonworkingUnits := .F.
			oChart:ShowNonworkingHours := .F.

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1479
How can I display the end of the day in the chart's header

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oLevel := oChart:Level(0)
				oLevel:Label := 4096
				oLevel:Alignment := 17/*exHOutside+CenterAlignment*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<%hh%>"
				oLevel1:Count := 6
				oLevel1:SetProperty("ReplaceLabel","08","<b>8</b> <font ;6>am")
				oLevel1:SetProperty("ReplaceLabel","14","<b>8</b> <font ;6>pm")
			oChart:UnitWidth := 26
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:NonworkingHours := 15728895
			oChart:ShowNonworkingUnits := .F.
			oChart:ShowNonworkingHours := .F.

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1478
How can I display the +/- expanding buttons in the chart section

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Indent := 13
		oG2antt:HasButtons := 3/*exWPlus*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/25/2010"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:ColumnsFormatLevel := "0"
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelForeColor",oG2antt:SelForeColor())
		oColumn := oG2antt:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:AddBar(oItems:InsertItem(h,,"Child 1"),"Task","01/02/2011","01/05/2011")
			oItems:AddBar(oItems:InsertItem(h,,"Child 2"),"Task","01/04/2011","01/07/2011")
			oItems:AddBar(oItems:InsertItem(h,,"Child 3"),"Task","01/07/2011","01/08/2011")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1477
Is it possible to display the columns in the chart aligned to the right

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 24
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Key")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,0)
			oColumn:Visible := .F.
			oColumn:Alignment := 2/*RightAlignment*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/30/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:ColumnsFormatLevel := "|,1:52"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Split","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 3"),"Progress","01/03/2001","01/07/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1476
How can I display a border in the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 24
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Key")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,0)
			oColumn:Visible := .F.
			oColumn:Alignment := 1/*CenterAlignment*/
			oColumn:SetProperty("Def",5/*exCellForeColor*/,255)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/30/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:ColumnsFormatLevel := "1:52,\" + CHR(34) + "\" + CHR(34) + "[bg=255]:2"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Split","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 3"),"Progress","01/03/2001","01/07/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1475
How can I change the font to display the columns in the chart (Method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oConditionalFormat
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 24
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Key")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,0)
			oColumn:Visible := .F.
		oConditionalFormat := oG2antt:ConditionalFormats():Add(Transform(1,""))
			oConditionalFormat:Bold := .T.
			oConditionalFormat:ApplyTo := 1/*0x1+*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/30/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Split","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 3"),"Progress","01/03/2001","01/07/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1474
How can I change the font to display the columns in the chart (Method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL oStdFont

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 24
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Key")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,0)
			oColumn:Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/30/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1"
			oChart:ColumnsFont := oG2antt:Font()
			oStdFont := oChart:ColumnsFont()
				oStdFont:Size := 12
				oStdFont:Name := "Tahoma"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Split","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 3"),"Progress","01/03/2001","01/07/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1473
How can I change the column's background color when it is displayed on the chart (Method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Key")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,0)
			oColumn:Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/30/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1[bg=255]:52"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Split","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 3"),"Progress","01/03/2001","01/07/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1472
How can I change the column's background color when it is displayed on the chart (Method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Key")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,0)
			oColumn:Visible := .F.
			oColumn:SetProperty("Def",4/*exCellBackColor*/,15790320)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/30/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1:52"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Split","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 3"),"Progress","01/03/2001","01/07/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1471
Can the chart display any column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Start")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumn:Visible := .F.
			oColumn:Alignment := 0/*LeftAlignment*/
		oColumn1 := oG2antt:Columns():Add("End")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1:52,|,2:52"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/08/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1470
Is it possible to display a check-box column on the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Check")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/08/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1469
Is it possible to disable the cell's editor context menu
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oEditor := oG2antt:Columns():Add("Edit"):Editor()
			oEditor:EditType := 1/*EditType*/
			oEditor:SetProperty("Option",202/*exEditAllowContextMenu*/,.F.)
		oItems := oG2antt:Items()
			oItems:AddItem(10)
			oItems:AddItem(20)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1468
How can I find a value in a drop down editor
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor,oEditor1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oEditor := oG2antt:Columns():Add("DropDownList"):Editor()
			oEditor:EditType := 3/*DropDownListType*/
			oEditor:AddItem(1,"DDList 1")
			oEditor:AddItem(2,"DDList 2")
			oEditor:AddItem(3,"DDList 3")
		oEditor1 := oG2antt:Columns():Add("DropDown"):Editor()
			oEditor1:EditType := 2/*DropDownType*/
			oEditor1:AddItem(1,"DDType 1")
			oEditor1:AddItem(2,"DDType 2")
			oEditor1:AddItem(3,"DDType 3")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",:AddItem(1),1,oG2antt:Columns:Item(1):Editor():FindItem(1))
			oItems:SetProperty("CellValue",:AddItem(2),1,oG2antt:Columns:Item(1):Editor():FindItem(2))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1467
What is the difference between DropDownType and DropDownListType
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor,oEditor1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oEditor := oG2antt:Columns():Add("DropDownList"):Editor()
			oEditor:EditType := 3/*DropDownListType*/
			oEditor:AddItem(1,"First item")
			oEditor:AddItem(2,"Second item")
			oEditor:AddItem(3,"Third item")
		oEditor1 := oG2antt:Columns():Add("DropDown"):Editor()
			oEditor1:EditType := 2/*DropDownType*/
			oEditor1:AddItem(1,"First item")
			oEditor1:AddItem(2,"Second item")
			oEditor1:AddItem(3,"Third item")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(1),1,"Any")
			oItems:SetProperty("CellValue",oItems:AddItem(2),1,"Any")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1466
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 32
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(2,"CP:1 -2 -2 2 2")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2002"
			oChart:SetProperty("SelBarColor",0x2ff0000)
			oChart:Bars:Item("Task"):SetProperty("Color",0x1000000)
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2002","01/04/2002","A")
			oItems:AddBar(h,"Task","01/06/2002","01/10/2002","B")
			oItems:AddBar(h,"Task","01/11/2002","01/14/2002","C")
			oItems:SetProperty("ItemBar",h,"A",257/*exBarSelected*/,.T.)
			oItems:SetProperty("ItemBar",h,"B",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1465
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 32
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(2,"CP:1 -2 -2 2 2")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2002"
			oChart:SetProperty("SelBarColor",0x2000000)
			oChart:Bars:Item("Task"):SetProperty("Color",0x1000000)
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2002","01/04/2002","A")
			oItems:AddBar(h,"Task","01/06/2002","01/10/2002","B")
			oItems:AddBar(h,"Task","01/11/2002","01/14/2002","C")
			oItems:SetProperty("ItemBar",h,"A",257/*exBarSelected*/,.T.)
			oItems:SetProperty("ItemBar",h,"B",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1464
How can I mark or enlarge the selected bars, so I have a clear frame around (Method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 32
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZBiOEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6rYzuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2TxxgGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4" +;
		"F4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==")
			oAppearance:Add(2,"CP:1 -2 -2 2 2")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2002"
			oChart:SetProperty("SelBarColor",0x2000000)
			oChart:SetProperty("PaneWidth",.F.,48)
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2002","01/04/2002","A")
			oItems:AddBar(h,"Task","01/06/2002","01/10/2002","B")
			oItems:AddBar(h,"Task","01/11/2002","01/14/2002","C")
			oItems:SetProperty("ItemBar",h,"A",257/*exBarSelected*/,.T.)
			oItems:SetProperty("ItemBar",h,"B",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1463
How can I load my table from an Access 2007, using ADO
PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1462
Is it possible to enumerate the links without enumerating them

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksWidth := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/06/2001","01/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/10/2001","01/12/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/14/2001","01/16/2001","K4")
			oItems:AddLink("L3",h3,"K3",h4,"K4")
			oItems:SetProperty("Link","<L*>",11/*exLinkShowDir*/,.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1461
How can I display a vertical line in the chart
PROCEDURE OnClick(oG2antt)
	LOCAL oChart
	oChart := oG2antt:Chart()
		oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oChart:MarkNow := oChart:DateFromPoint(-1,-1)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "03/13/2012"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
			oChart:MarkNowWidth := 3
			oChart:UnitWidth := 32
			oChart:ResizeUnitScale := 65536/*exHour*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1460
How can I use the MarkNowColor to mark a time line different then the time on the machine

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "03/13/2012"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oChart:MarkNowWidth := 3
			oChart:MarkNow := "03/13/2012 00:03:20"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1459
Is it possible to show the current date time using a delay

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:Level(0):Label := 1048576
			oLevel := oChart:Level(1)
				oLevel:Label := "<%ss%>"
				oLevel:Count := 15
			oChart:SetProperty("MarkNowColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oChart:MarkNowWidth := 3
			oChart:MarkNowDelay := 0.00069444
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2008","01/01/2018")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1458
What are the options to show the links between bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4,h5

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksWidth := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddItem("")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddItem("")
			oItems:AddBar(h2,"Task","01/06/2001","01/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddItem("")
			oItems:AddBar(h3,"Task","01/12/2001","01/14/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",15/*exLinkShowRound*/,-1)
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/18/2001","01/20/2001","K4")
			oItems:AddLink("L3",h3,"K3",h4,"K4")
			oItems:SetProperty("Link","L3",15/*exLinkShowRound*/,1)
			oItems:AddItem("")
			h5 := oItems:AddItem("Task 5")
			oItems:AddBar(h5,"Task","01/22/2001","01/24/2001","K5")
			oItems:AddLink("L4",h4,"K4",h5,"K5")
			oItems:SetProperty("Link","L4",15/*exLinkShowRound*/,2)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1457
Is it possible to specify the link between bars to be a wider line

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksStyle := 0/*exLinkSolid*/
			oChart:LinksWidth := 2
			oChart:SetProperty("LinksColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/06/2001","01/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/10/2001","01/12/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1456
Is it possible to create a link between the two specified bars so that the link was a straight line

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:AntiAliasing := .T.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/06/2001","01/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",9/*exLinkStyle*/,0)
			oItems:SetProperty("Link","L1",10/*exLinkWidth*/,2)
			oItems:SetProperty("Link","L1",8/*exLinkColor*/,255)
			oItems:SetProperty("Link","L1",15/*exLinkShowRound*/,2)
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/10/2001","01/12/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1455
I associate the bars with my columns, Start and End, but can not get it working for bars with non-empty keys. What am I doing wrong

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumn := oColumns:Add("Start")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
				oColumn:SetProperty("Def",19/*exCellValueToItemBarKey*/,"A")
			oColumn1 := oColumns:Add("End")
				oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
				oColumn1:SetProperty("Def",19/*exCellValueToItemBarKey*/,"A")
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:FirstVisibleDate := "01/01/2002"
			oChart:LevelCount := 2
			oChart:Bars:Item("Task"):OverlaidType := 3/*exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/04/2002","01/08/2002","A","A")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/06/2002","01/10/2002","A","A")
			oItems:AddBar(h,"Task","01/04/2002","01/08/2002","B","B")
			oItems:SetProperty("ItemBar",h,"B",33/*exBarColor*/,255)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1454
The right pane needs to show ONLY the hours 6am to 9pm (every hour) for one day only and the user should not to be able to scroll left or right nor see any other hours. How can I do that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("ScrollRange",0/*exStartDate*/,"01/01/2001")
			oChart:SetProperty("ScrollRange",1/*exEndDate*/,"01/01/2001")
			oChart:UnitScale := 65536/*exHour*/
			oChart:NonworkingHours := 12582975
			oChart:ShowNonworkingUnits := .F.
			oChart:ShowNonworkingHours := .F.
			oChart:Level(0):Alignment := 17/*exHOutside+CenterAlignment*/
			oChart:UnitWidth := 18
			oChart:SetProperty("PaneWidth",.T.,294)
			oChart:ScrollBar := .F.
		oG2antt:OnResizeControl := 128/*exDisableSplitter*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1453
Is it possible to count only a specified type of bars without enumerating them
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Progress","01/03/2001","01/05/2001")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","P3","P3")
			DevOut( "K*" )
			DevOut( Transform(oItems:ItemBar(0,"<K*>",256/*exBarsCount*/),"") )
			DevOut( "K* P*" )
			DevOut( Transform(oItems:ItemBar(0,"<K* P*>",256/*exBarsCount*/),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1452
How can I count or get the numbers of the bars in the chart
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","A2","A2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K3","K3")
			DevOut( "All" )
			DevOut( Transform(oItems:ItemBar(0,"<*>",256/*exBarsCount*/),"") )
			DevOut( "A*" )
			DevOut( Transform(oItems:ItemBar(0,"<A*>",256/*exBarsCount*/),"") )
			DevOut( "K*" )
			DevOut( Transform(oItems:ItemBar(0,"<K*>",256/*exBarsCount*/),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1451
Is it possible to remove only specified bars from ALL items at once
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","A2","A2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K3","K3")
			oItems:RemoveBar(0,"<K*>")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1450
How can I remove all bars from the chart (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","A2","A2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K3","K3")
			oItems:ClearBars(0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1449
How can I remove all bars from the chart (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","A2","A2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K3","K3")
			oItems:RemoveBar(0,"<*>")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1448
Is it possible to update at once a property for several bars without enumerating them
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","A2","A2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K3","K3")
			oItems:SetProperty("ItemBar",0,"<K*>",33/*exBarColor*/,255)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1447
Is it possible to update at once a property of ALL bars without enumerating them
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","A2","A2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/04/2001","K3","K3")
			oItems:SetProperty("ItemBar",0,"<*>",33/*exBarColor*/,255)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1446
How do I prevent selecting a new item when selecting a bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:SelectOnClick := .F.
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/06/2001","K2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/08/2001","01/10/2001","K3")
			oItems:SetProperty("SelectItem",oItems:FirstVisibleItem(),.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1445
Is it possible to find out all incoming bars ( recursively )

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,542/*exBarIncomingBarsAllDebug*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:NonworkingDays := 0
			oChart:AllowLinkBars := .T.
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","B","B")
			oItems:AddLink("L1",h1,"A",h2,"B")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","C","C")
			oItems:AddLink("L2",h2,"B",h3,"C")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/08/2001","01/10/2001","D","D")
			oItems:AddLink("L3",h1,"A",h4,"D")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1444
How do I find the incoming bars
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,541/*exBarIncomingBarsDebug*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:NonworkingDays := 0
			oChart:AllowLinkBars := .T.
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","B","B")
			oItems:AddLink("L1",h1,"A",h2,"B")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","C","C")
			oItems:AddLink("L2",h2,"B",h3,"C")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/08/2001","01/10/2001","D","D")
			oItems:AddLink("L3",h1,"A",h4,"D")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1443
Is it possible to find out all incoming links ( recursively ). Incoming link is a link from another bar to the current bar
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,536/*exBarIncomingLinksAllAsString*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:NonworkingDays := 0
			oChart:AllowLinkBars := .T.
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","B","B")
			oItems:AddLink("L1",h1,"A",h2,"B")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","C","C")
			oItems:AddLink("L2",h2,"B",h3,"C")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/08/2001","01/10/2001","D","D")
			oItems:AddLink("L3",h1,"A",h4,"D")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1442
How do I find the incoming links. Incoming link is link from another bar to the current bar
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,534/*exBarIncomingLinksAsString*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:NonworkingDays := 0
			oChart:AllowLinkBars := .T.
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","B","B")
			oItems:AddLink("L1",h1,"A",h2,"B")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","C","C")
			oItems:AddLink("L2",h2,"B",h3,"C")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/08/2001","01/10/2001","D","D")
			oItems:AddLink("L3",h1,"A",h4,"D")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1441
Is it possible to find out all outgoing bars ( recursively )
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,532/*exBarOutgoingBarsAllDebug*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:NonworkingDays := 0
			oChart:AllowLinkBars := .T.
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","B","B")
			oItems:AddLink("L1",h1,"A",h2,"B")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","C","C")
			oItems:AddLink("L2",h2,"B",h3,"C")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/08/2001","01/10/2001","D","D")
			oItems:AddLink("L3",h1,"A",h4,"D")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1440
How do I find the outgoing bars
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,531/*exBarOutgoingBarsDebug*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:NonworkingDays := 0
			oChart:AllowLinkBars := .T.
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","B","B")
			oItems:AddLink("L1",h1,"A",h2,"B")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","C","C")
			oItems:AddLink("L2",h2,"B",h3,"C")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/08/2001","01/10/2001","D","D")
			oItems:AddLink("L3",h1,"A",h4,"D")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1439
Is it possible to find out all outgoing links ( recursively ). Outgoing link is link from a bar to another bar
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,526/*exBarOutgoingLinksAllAsString*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:NonworkingDays := 0
			oChart:AllowLinkBars := .T.
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","B","B")
			oItems:AddLink("L1",h1,"A",h2,"B")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","C","C")
			oItems:AddLink("L2",h2,"B",h3,"C")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/08/2001","01/10/2001","D","D")
			oItems:AddLink("L3",h1,"A",h4,"D")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1438
How do I find the outgoing links. Outgoing link is link from a bar to another bar
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,524/*exBarOutgoingLinksAsString*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:NonworkingDays := 0
			oChart:AllowLinkBars := .T.
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","B","B")
			oItems:AddLink("L1",h1,"A",h2,"B")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","C","C")
			oItems:AddLink("L2",h2,"B",h3,"C")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/08/2001","01/10/2001","D","D")
			oItems:AddLink("L3",h1,"A",h4,"D")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1437
How do I select a bar using the right-click
PROCEDURE OnMouseDown(oG2antt,Button,Shift,X,Y)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBar",0,"<*>",257/*exBarSelected*/,.F.)
		oItems:SetProperty("ItemBar",oG2antt:ItemFromPoint(-1,-1,c,hit),oG2antt:Chart():BarFromPoint(-1,-1),257/*exBarSelected*/,.T.)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseDown := {|Button,Shift,X,Y| OnMouseDown(oG2antt,Button,Shift,X,Y)} /*Occurs when the user presses a mouse button.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/06/2001","K2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/08/2001","01/10/2001","K3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1436
How can I add or change the padding (spaces) for captions in the control's header
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Padding-Left"):SetProperty("Def",52/*exHeaderPaddingLeft*/,18)
		oColumn := oG2antt:Columns():Add("Padding-Right")
			oColumn:SetProperty("Def",53/*exHeaderPaddingRight*/,18)
			oColumn:HeaderAlignment := 2/*RightAlignment*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1435
Do you have any plans to add cell spacing and cell padding to the cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oColumn := oG2antt:Columns():Add("Padding-Left")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,18)
		oG2antt:Columns():Add("No-Padding"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oG2antt:Columns():Add("Empty"):Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A.1"),1,"Item A.2")
			oItems:SetProperty("CellValue",oItems:AddItem("Item B.1"),1,"Item B.2")
			oItems:SetProperty("CellValue",oItems:AddItem("Item C.1"),1,"Item C.2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1434
Can I display somehow the filter just on the top of the list, with an editor associated to each column

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	LOCAL oColumn
	DevOut( "Locked:" )
	DevOut( Transform(oG2antt:Items:IsItemLocked(Item),"") )
	oColumn := oG2antt:Columns:Item(ColIndex)
		oColumn:Filter := Transform(NewValue,"")
		oColumn:FilterType := 3/*exPattern*/
	oG2antt:ApplyFilter()
RETURN

PROCEDURE OnMouseUp(oG2antt,Button,Shift,X,Y)
	oG2antt:Edit(oG2antt:Items:LockedItem(0/*exTop*/,0))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/
		oG2antt:MouseUp := {|Button,Shift,X,Y| OnMouseUp(oG2antt,Button,Shift,X,Y)} /*Occurs when the user releases a mouse button.*/

		oG2antt:ColumnAutoResize := .F.
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:ContinueColumnScroll := .F.
		oG2antt:Chart():FirstVisibleDate := "08/03/1994"
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",0/*exTop*/,2)
			h := oItems:LockedItem(0/*exTop*/,0)
			oItems:CellEditor(h,0):EditType := 1/*EditType*/
			h := oItems:LockedItem(0/*exTop*/,1)
			oItems:SetProperty("ItemHeight",h,4)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("SelectableItem",h,.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1433
Is it possible to display information about the firing events
PROCEDURE OnEvent(oG2antt,EventID)
	DevOut( Transform(oG2antt:EventParam(-2),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Event := {|EventID| OnEvent(oG2antt,EventID)} /*Notifies the application once the control fires an event.*/


	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1432
I need to specify the start and end dates of the bar to be the same, but to keep count of the working units. Is it possible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumns:Add("Start"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumns:Add("End"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,543)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:ShowEmptyBars := 1
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/21/2006")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/25/2006","09/25/2006")
			oItems:SetProperty("ItemBar",0,"<*>",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1431
I need to specify the start and end dates of the bar to be the same, but no bars are shown. (NOT recommended for bars with exBarKeepWorkingCount ) What I can do

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumns:Add("Start"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumns:Add("End"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,543)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:ShowEmptyBars := 1
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/21/2006")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/22/2006")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/25/2006","09/25/2006")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1430
I need my chart to display the end date with on day less. How can I do this (Method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumn := oColumns:Add("Start")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
				oColumn:Editor():EditType := 7/*DateType*/
			oColumn1 := oColumns:Add("End")
				oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,543)
				oColumn1:Editor():EditType := 7/*DateType*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:NonworkingDays := 0
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/24/2006")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/23/2006","09/26/2006")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1429
Is it possible to change the width of a specified time unit

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oInsideZoom
	LOCAL oInsideZooms

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:AllowInsideZoom := .T.
			oChart:AllowResizeInsideZoom := .F.
			oChart:InsideZoomOnDblClick := .F.
			oChart:DefaultInsideZoomFormat():SetProperty("BackColorChart",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,255 } )  , .F. ))
			oInsideZooms := oChart:InsideZooms()
				oInsideZooms:SplitBaseLevel := .F.
				oInsideZooms:DefaultWidth := 18
				oInsideZoom := oInsideZooms:Add("01/15/2008")
					oInsideZoom:AllowInsideFormat := .F.
					oInsideZoom:Width := 128
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1428
The level unit of the chart is set to day, so i'd like to set the whole background of the current day. Is it possible to set a background color only on the current day (Method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oInsideZooms

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:AllowInsideZoom := .T.
			oChart:AllowResizeInsideZoom := .F.
			oChart:InsideZoomOnDblClick := .F.
			oChart:DefaultInsideZoomFormat():SetProperty("BackColorChart",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oInsideZooms := oChart:InsideZooms()
				oInsideZooms:SplitBaseLevel := .F.
				oInsideZooms:DefaultWidth := 18
				oInsideZooms:Add("01/15/2008"):AllowInsideFormat := .F.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1427
The level unit of the chart is set to day, so i'd like to set the whole background of the current day. Is it possible to set a background color only on the current day (Method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2008"
			oChart:SetProperty("MarkTodayColor",oChart:BackColor())
			oChart:LevelCount := 2
			oChart:SetProperty("MarkSelectDateColor",0x7fff0000)
			oChart:SelectLevel := 1
			oChart:SetProperty("SelectDate","01/15/2008",.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1426
How can I change the layout of my columns when using the exCRD

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:DefaultItemHeight := 36
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("Column1")
				oColumn:Visible := .F.
				oColumn:Editor():EditType := 1/*EditType*/
			oColumn1 := oColumns:Add("Column2")
				oColumn1:Visible := .F.
				oColumn1:Editor():EditType := 1/*EditType*/
			oColumns:Add("Column3"):Visible := .F.
			oColumn2 := oColumns:Add("FormatLevel")
				oColumn2:FormatLevel := "(0/1),2"
				oColumn2:SetProperty("Def",32/*exCellFormatLevel*/,oColumn2:FormatLevel())
		oItems := oG2antt:Items()
			h := oItems:AddItem("Cell 1.1")
			oItems:SetProperty("CellValue",h,1,"Cell 1.2")
			oItems:SetProperty("CellValue",h,2,"Cell 1.3")
			h := oItems:AddItem("Cell 2.1")
			oItems:SetProperty("CellValue",h,1,"Cell 2.2")
			oItems:SetProperty("CellValue",h,2,"Cell 2.3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1425
How can I overlaid a single bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidGroup := "OTask"
				oBar:OverlaidType := 0/*exOverlaidBarsNone*/
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>")
			oBar1 := oChart:Bars():CallMethod("Copy","Task","OTask")
				oBar1:OverlaidGroup := "Task"
				oBar1:OverlaidType := 8196/*exOverlaidBarsStrict+exOverlaidBarsCascade*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			h := oItems:AddItem("Overlaid")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"OTask","01/03/2001","01/05/2001","A2")
			oItems:SetProperty("ItemBar",h,"A2",33/*exBarColor*/,255)
			oItems:AddBar(h,"Task","01/05/2001","01/08/2001","A4")
			h1 := oItems:AddItem("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1424
How can I use the exOverlaidBarsCascade, exBarOverlaidKey

PROCEDURE OnCreateBar(oG2antt,Item,DateStart,DateEnd)
	oG2antt:Items():SetProperty("ItemBar",Item,"newbar",52/*exBarOverlaidKey*/,"Level0")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:CreateBar := {|Item,DateStart,DateEnd| OnCreateBar(oG2antt,Item,DateStart,DateEnd)} /*Fired when the user creates a new bar.*/

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 4/*exOverlaidBarsCascade*/
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			h := oItems:AddItem("Overlaid")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:SetProperty("ItemBar",h,"A1",52/*exBarOverlaidKey*/,"Level0")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			oItems:SetProperty("ItemBar",h,"A3",52/*exBarOverlaidKey*/,"Level0")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:SetProperty("ItemBar",h,"A2",33/*exBarColor*/,255)
			oItems:SetProperty("ItemBar",h,"A2",52/*exBarOverlaidKey*/,"Level1")
			oItems:AddBar(h,"Task","01/05/2001","01/08/2001","A4")
			oItems:SetProperty("ItemBar",h,"A4",33/*exBarColor*/,255)
			oItems:SetProperty("ItemBar",h,"A4",52/*exBarOverlaidKey*/,"Level1")
			h1 := oItems:AddItem("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1423
How can I use the exOverlaidBarsStack+exOverlaidBarsStackAutoArrange

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			h := oItems:AddItem("Overlaid")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"Task","01/05/2001","01/08/2001","A4")
			h1 := oItems:AddItem("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1422
How can I use the exOverlaidBarsStack

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 3/*exOverlaidBarsStack*/
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			h := oItems:AddItem("Overlaid")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"Task","01/05/2001","01/08/2001","A4")
			h1 := oItems:AddItem("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1421
How can I use the exOverlaidBarsIntersect

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 2/*exOverlaidBarsIntersect*/
				oBar:SetProperty("Overlaid",2/*exOverlaidBarsIntersect*/,"Progress")
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			h := oItems:AddItem("Overlaid")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"Task","01/05/2001","01/08/2001","A4")
			h1 := oItems:AddItem("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1420
How can I use the exOverlaidBarsOffset

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 1/*exOverlaidBarsOffset*/
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			h := oItems:AddItem("Overlaid")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"Task","01/05/2001","01/08/2001","A4")
			h1 := oItems:AddItem("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1419
Is it possible to specify the end of the project when using the SchedulePDM method
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/05/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"FS")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/06/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"SS")
			oItems:SetProperty("Link","L2",6/*exLinkStartPos*/,0)
			oItems:SetProperty("Link","L2",7/*exLinkEndPos*/,0)
			oItems:SetProperty("DefSchedulePDM",0/*exPDMScheduleType*/,2)
			oItems:SetProperty("DefSchedulePDM",1/*exPDMScheduleDate*/,"01/08/2001")
			oItems:SchedulePDM(0,"K1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1418
Is it possible to specify the start of the project when using the SchedulePDM method
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/05/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"FS")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/06/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"SS")
			oItems:SetProperty("Link","L2",6/*exLinkStartPos*/,0)
			oItems:SetProperty("Link","L2",7/*exLinkEndPos*/,0)
			oItems:SetProperty("DefSchedulePDM",0/*exPDMScheduleType*/,1)
			oItems:SetProperty("DefSchedulePDM",1/*exPDMScheduleDate*/,"01/08/2001")
			oItems:SchedulePDM(0,"K1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1417
How can I change the caption or the addition information being displayed in the Zoom-OnFly view

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:AllowZoomOnFly := 24/*exZoomOnFly*/
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("Label",65536/*exHour*/,"<font ;5><b><%h%><br><%AM/PM%></b></font>")
			oChart:ZoomOnFlyCaption := "<br><c><b><font ;12><%=%C0 + ' / <fgcolor=00FF00>' + %3%></font></fgcolor></b><br><solidline><upline><b>Start</b>:<%=%1%><br><b>End</b>:<%=%2%><br><b>Duration</b>:<%=round(%2-%1) + ' days'%><br><b>Working</b>:<%='<b>' + int(%258) + '</b> days' + (0:=(%258 - int(%258)) ? (' <fgcolor=FF0000><b>' + round(24 * =:0) + '</b> hours') : '') %>"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","T1","T1")
			oItems:AddBar(h,"Task","01/11/2001","01/14/2001","T3","T3")
			h := oItems:AddItem()
			oItems:AddBar(h,"","01/15/2001","01/15/2001","","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.")
			oItems:SetProperty("SelectableItem",h,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1416
How can I change the scale in the Zoom-OnFly view

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:AllowZoomOnFly := 24/*exZoomOnFly*/
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("Label",65536/*exHour*/,"<font ;5><b><%h%><br><%AM/PM%></b></font>")
			oChart:ZoomOnFlyCaption := ""
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","T1","T1")
			oItems:AddBar(h,"Task","01/11/2001","01/14/2001","T3","T3")
			h := oItems:AddItem()
			oItems:AddBar(h,"","01/15/2001","01/15/2001","","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.")
			oItems:SetProperty("SelectableItem",h,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1415
Is it possible to change the Zoom-OnFly view's background color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:AllowZoomOnFly := 24/*exZoomOnFly*/
			oChart:SetProperty("BackColorZoomOnFly",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","T1","T1")
			oItems:AddBar(h,"Task","01/11/2001","01/14/2001","T3","T3")
			h := oItems:AddItem()
			oItems:AddBar(h,"","01/15/2001","01/15/2001","","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.")
			oItems:SetProperty("SelectableItem",h,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1414
How can I include the selected items in the Zoom-OnFly view

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:AllowZoomOnFly := 792/*exZoomOnFlyIncludeSelectedItems+exZoomOnFly*/
			oChart:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oChart:SelectOnClick := .F.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","T1","T1")
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/11/2001","01/14/2001","T2","T2")
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","T3","T3")
			h := oItems:AddItem()
			oItems:AddBar(h,"","01/15/2001","01/15/2001","","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.")
			oItems:SetProperty("SelectableItem",h,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1413
Is it possible to include the neighbors items in the Zoom-OnFly view

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:AllowZoomOnFly := 280/*exZoomOnFlyIncludeNeighborItems+exZoomOnFly*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","T1","T1")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/11/2001","01/14/2001","T3","T3")
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","T1","T1")
			h := oItems:AddItem()
			oItems:AddBar(h,"","01/15/2001","01/15/2001","","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.")
			oItems:SetProperty("SelectableItem",h,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1412
How can I enable the Zoom-OnFly view

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "11/05/2000"
			oChart:LevelCount := 2
			oChart:UnitScale := 256/*exWeek*/
			oChart:ResizeUnitScale := 4096/*exDay*/
			oChart:AllowZoomOnFly := 24/*exZoomOnFly*/
			oChart:Bars:Item("Task"):OverlaidType := 3/*exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/07/2001","01/17/2001","T1","T1")
			oItems:AddBar(h,"Task","01/18/2001","02/24/2001","T3","T3")
			h := oItems:AddItem()
			oItems:AddBar(h,"","01/15/2001","01/15/2001","","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.")
			oItems:SetProperty("SelectableItem",h,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1411
I am using the overlay bars on stack, can I somehow tell a type of bar, or a specific bar, to be always on top of all other’s. Like a Z-Index or something

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):OverlaidType := 3/*exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A1","A1")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A3","A3")
			oItems:SetProperty("ItemBar",h,"A3",33/*exBarColor*/,65280)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A31","A31")
			oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A3","A3")
			oItems:SetProperty("ItemBar",h,"A3",33/*exBarColor*/,255)
			oItems:AddBar(oItems:AddItem(),"","01/10/2001","01/10/2001",,"The <b>Key</b> of the bar specifies the Z-Order when overlaying.")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1410
Is it possible to specify the z-order when using the overlaying feature

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:NonworkingDays := 0
			oChart:FirstVisibleDate := "09/17/2006"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:Bars:Item("Task"):OverlaidType := 4/*exOverlaidBarsCascade*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task")
			oItems:AddBar(h1,"Task","09/21/2006","09/27/2006","K1","K1")
			oItems:AddBar(h1,"Task","09/23/2006","09/24/2006","K2","K2")
			oItems:AddBar(h1,"Task","09/22/2006","09/25/2006","K3","K3")
			oItems:AddBar(h1,"Task","09/21/2006","09/27/2006","T1","T1")
			oItems:AddBar(h1,"Task","09/28/2006","09/29/2006","T2","T2")
			oItems:AddBar(h1,"Task","09/30/2006","10/03/2006","T3","T3")
			oItems:SetProperty("ItemBar",0,"<T*>",33/*exBarColor*/,65280)
			oItems:SetProperty("ItemBar",0,"<K*>",52/*exBarOverlaidKey*/,"A")
			oItems:SetProperty("ItemBar",0,"<T*>",52/*exBarOverlaidKey*/,"B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1409
I seen that there is no exBarStartColor, exBarEndColor, similar to exBarColor, is there any solution so I can display a different Start/End Color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars():CallMethod("Copy","Summary","Aka1")
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oBar1 := oChart:Bars():CallMethod("Copy","Summary","Aka2")
				oBar1:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
				oBar1:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,255 } )  , .F. ))
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item A")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","B1")
			oItems:SetProperty("ItemBar",h,"B1",0/*exBarName*/,"Aka1")
			h := oItems:AddItem("Item B")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","B2")
			oItems:SetProperty("ItemBar",h,"B2",0/*exBarName*/,"Aka2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1408
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:SetProperty("HTMLPicture","p1","c:\exontrol\images\card.png")
		oG2antt:SetProperty("HTMLPicture","p2","c:\exontrol\images\sun.png")
		oG2antt:AutoDrag := 11/*exAutoDragCopySnapShot*/
		oG2antt:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oG2antt:HasLines := 2/*exThinLine*/
		oG2antt:ShowFocusRect := .F.
		oG2antt:DefaultItemHeight := 26
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ShowNonworkingDates := .F.
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:LevelCount := 2
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Color",0x1000000)
				oBar:Height := 18
		oItems := oG2antt:Items()
			h := oItems:AddItem("<img>p1:32</img>Group 1")
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemBold",h,.T.)
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"L1")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"L2")
			h := oItems:AddItem("<img>p2:32</img>Group 2")
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
			h1 := oItems:InsertItem(h,,"Task")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1407
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h,var_HTMLPicture
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("HTMLPicture","p1","c:\exontrol\images\card.png")
		oG2antt:SetProperty("HTMLPicture","p2","c:\exontrol\images\sun.png")
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		var_HTMLPicture := oG2antt:HTMLPicture("aka1")
		oG2antt:HeaderHeight := 24
		oG2antt:DefaultItemHeight := 48
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Columns:Item(0):SetProperty("Def",17/*exCellValueFormat*/,1)
		oG2antt:Columns:Item(0):FormatColumn := "value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`"
		oG2antt:Columns:Item(0):Width := 112
		oG2antt:Columns:Item(1):SetProperty("Def",0/*exCellHasCheckBox*/,1)
		oG2antt:Columns:Item(2):LevelKey := "1"
		oG2antt:Columns:Item(3):LevelKey := "1"
		oG2antt:Columns:Item(4):LevelKey := "1"
		oG2antt:AutoDrag := 10/*exAutoDragCopyImage*/
		oG2antt:SingleSel := .F.
		oItems := oG2antt:Items()
			h := oItems:ItemByIndex(1)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(2)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(3)
			oItems:SetProperty("SelectItem",h,.T.)
			oItems:SetProperty("LockedItemCount",2/*exBottom*/,1)
			h := oItems:LockedItem(2/*exBottom*/,0)
			oItems:SetProperty("CellValue",h,1,"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ...")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			oItems:SetProperty("CellValueFormat",h,1,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",h,1,1/*CenterAlignment*/)
			oItems:SetProperty("ItemDivider",h,1)
			oItems:SetProperty("ItemDividerLineAlignment",h,2/*DividerTop*/)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1406
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Columns:Item(2):LevelKey := "1"
		oG2antt:Columns:Item(3):LevelKey := "1"
		oG2antt:Columns:Item(4):LevelKey := "1"
		oG2antt:AutoDrag := 9/*exAutoDragCopyText*/
		oG2antt:SingleSel := .F.
		oItems := oG2antt:Items()
			h := oItems:ItemByIndex(1)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(3)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(4)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(5)
			oItems:SetProperty("SelectItem",h,.T.)
			oItems:SetProperty("LockedItemCount",2/*exBottom*/,1)
			h := oItems:LockedItem(2/*exBottom*/,0)
			oItems:SetProperty("CellValue",h,0,"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ...")
			oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLineAlignment",h,2/*DividerTop*/)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1405
Is it possible to change the indentation during the drag and drop
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:AutoDrag := 3/*exAutoDragPositionAny*/
		oG2antt:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oG2antt:HasLines := 1/*exSolidLine*/
		oG2antt:HasButtons := 3/*exWPlus*/
		oG2antt:ShowFocusRect := .F.
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ShowNonworkingDates := .F.
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:Bars:Item("Task"):SetProperty("Color",0x1000000)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Group 1")
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:InsertItem(h1,,"Task 2")
			oItems:AddBar(h2,"Task","01/15/2001","01/17/2001","K4")
			h2 := oItems:InsertItem(h1,,"Task 3")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"L1")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"L2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ExpandItem",h1,.T.)
			h := oItems:AddItem("Group 2")
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("LockedItemCount",2/*exBottom*/,1)
			h := oItems:LockedItem(2/*exBottom*/,0)
			oItems:SetProperty("CellValue",h,0,"Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the indentation.")
			oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1404
Is it possible to allow moving an item to another, but keeping its indentation
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:AutoDrag := 2/*exAutoDragPositionKeepIndent*/
		oG2antt:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oG2antt:HasLines := 2/*exThinLine*/
		oG2antt:ShowFocusRect := .F.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ShowNonworkingDates := .F.
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:LevelCount := 2
			oChart:Bars:Item("Task"):SetProperty("Color",0x1000000)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Group 1")
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemBold",h,.T.)
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"L1")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"L2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Group 2")
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1403
How can I change the row's position to another, by drag and drop. Is it possible
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:AutoDrag := 1/*exAutoDragPosition*/
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ShowNonworkingDates := .F.
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:Bars:Item("Task"):SetProperty("Color",0x1000000)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"L1")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"L2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1402
Is it possible to scroll the control's content by clicking and moving the mouse up or down

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:AutoDrag := 16/*exAutoDragScroll*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1401
How can I display bars so they fit the entire height ( height of the row )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL oLevel
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:DefaultItemHeight := 36
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,164)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:UnitWidth := 48
			oChart:LevelCount := 2
			oChart:UnitScale := 65536/*exHour*/
			oChart:NonworkingHours := 16253183
			oChart:ShowNonworkingUnits := .F.
			oChart:UnitWidth := 16
			oChart:FirstVisibleDate := "01/01/2012 08:00:00"
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:Bars():Add("Empty"):Pattern := 0/*exPatternEmpty*/
			oLevel := oChart:Level(0)
				oLevel:Alignment := 17/*exHOutside+CenterAlignment*/
				oLevel:Label := "<%d2%>"
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:BarsAllowSizing := .F.
			oChart:AllowSelectObjects := 0/*exNoSelectObjects*/
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:ShowFocusRect := .F.
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("CA")
				oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
				oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn1 := oColumns:Add("CB")
				oColumn1:SetProperty("Def",16/*exCellSingleLine*/,.F.)
				oColumn1:SetProperty("Def",17/*exCellValueFormat*/,1)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Address 1.1<br>Line 2.1<br>C1")
			oItems:SetProperty("ItemMaxHeight",h,96)
			oItems:SetProperty("CellValue",h,1,"Address 1.2<br>Line 2.2<br>C2")
			oItems:AddBar(h,"Empty","01/02/2012 08:00:00","01/02/2012 19:00:00","A","This is a bit of text<br>being <font ;9>displayed ion the <b>bar A")
			oItems:SetProperty("ItemBar",h,"A",7/*exBarBackColor*/,16777471)
			oItems:SetProperty("ItemBar",h,"A",4/*exBarHAlignCaption*/,0)
			oItems:SetProperty("ItemBar",h,"A",5/*exBarVAlignCaption*/,2)
			oItems:AddBar(h,"Empty","01/03/2012 08:00:00","01/03/2012 19:00:00","B","<fgcolor=FFFFFF>This is a bit of text<br><fgcolor=FFFFFF>being <font ;9>displayed ion the <b>bar B")
			oItems:SetProperty("ItemBar",h,"B",7/*exBarBackColor*/,33488896)
			oItems:SetProperty("ItemBar",h,"B",4/*exBarHAlignCaption*/,2)
			oItems:SetProperty("ItemBar",h,"B",5/*exBarVAlignCaption*/,0)
			oItems:AddBar(h,"Empty","01/04/2012 08:00:00","01/04/2012 19:00:00","C","<font Tahoma;12><b>bar C")
			oItems:SetProperty("ItemBar",h,"C",7/*exBarBackColor*/,33489151)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN